import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/UniMenu.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/gk',
    name: 'index',
    redirect: '/gk/Home',
    component: () => import("../views/index"),
    children: [
      {
        path: 'UniMenu',
        name: 'UniMenu',
        component: () => import("../views/UniMenu")
      },
      {
        path: 'Home',
        name: 'Home',
        component: () => import ("../views/Home")
      },
      {
        path: 'Recommend',
        name: 'Recommend',
        component: () => import("../views/Recommend")
      },
      // {
      //   path: '/about',
      //   name: 'about',
      //   component: () => import( '../views/test.vue')
      // },
      {
        path: '/uniDetail',
        name: 'Detail',
        component: () => import( '../views/uniDetail')
      },
    ]
  },
  {
    path: "/",
    name: "Login",
    component: () => import('../views/Login')
  },
  {
    path: "/register",
    name:"Register",
    component: () => import('../views/Register')
  }
    ]


const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
